Skip to content

Android: introduce unit tests and Kotlin - #38

Open
ofalvai wants to merge 1 commit into
masterfrom
push-rzlklynysuys
Open

Android: introduce unit tests and Kotlin#38
ofalvai wants to merge 1 commit into
masterfrom
push-rzlklynysuys

Conversation

@ofalvai

@ofalvai ofalvai commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Why

We want unit test coverage for the Android native module, and to be able to write new Android code in Kotlin instead of Java. This PR introduces both, and upgrades this legacy module's Gradle/AGP/Kotlin toolchain to support it.

What

  • Adds Kotlin support to Android native module and its Gradle config. This turned out to be a bit complicated, thanks to AGP 9, RN 0.87, and the fact that we as a RN library having to support projects both pre-RN-0.87 (and AGP 9), and beyond at the same time. See this community RFC for details.
  • Adds the first unit test written in Kotlin.
  • Adds a fast android-unit-test CI job that gates the slower emulator-based e2e suite.
  • Bumps this repo's own standalone test harness (AGP/Gradle/Kotlin toolchain, SDK/build-tool fallback defaults) to match RN's current app template.

Decisions

  • Lots of subtle build tooling decisions, but I captured them as comments in the files, so that they don't get lost in a PR description after merge.
  • Unit tests run in their own fast job rather than sharing one with the e2e suite, so a broken unit test fails in ~1 minute instead of after the full e2e run.

@ofalvai
ofalvai force-pushed the push-rzlklynysuys branch 3 times, most recently from 43475d9 to a07a896 Compare August 20, 2026 10:10
@ofalvai
ofalvai marked this pull request as ready for review August 20, 2026 12:25
@ofalvai
ofalvai force-pushed the push-rzlklynysuys branch from a07a896 to 659d14c Compare August 20, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant